Skip to content

feat(report): make screenshot consumers format-aware - #3013

Draft
quanru wants to merge 9 commits into
feat/webp-primitives-v2from
feat/webp-format-aware-consumers-v2
Draft

feat(report): make screenshot consumers format-aware#3013
quanru wants to merge 9 commits into
feat/webp-primitives-v2from
feat/webp-format-aware-consumers-v2

Conversation

@quanru

@quanru quanru commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • make screenshot references, report dumps, CLI artifacts, and UI consumers format-aware
  • enforce encoded PNG/JPEG/WebP bytes as the source of truth at screenshot creation and persistence boundaries
  • reject declared MIME types or file extensions that disagree with encoded bytes
  • preserve actual formats across Report, Playground, Visualizer, Markdown, and observation records
  • avoid eager screenshot file reads when an identical file has already been persisted

Scope

This is P2 of the WebP screenshot stack. It prepares consumers for WebP without changing the Core screenshot production default or the model input default.

Validation

  • pnpm run lint
  • pnpm --dir packages/shared test (521 passed)
  • pnpm --dir packages/core test (1511 passed, 8 skipped)
  • pnpm --dir apps/report test (109 passed)
  • pnpm exec nx build @midscene/shared
  • pnpm exec nx build @midscene/core
  • pnpm exec nx build @midscene/report
  • pnpm --dir packages/web-integration test -- tests/unit-test/browser-webp-encoder-e2e.test.ts (2 passed)

Stack

The superseded WebP stacks (#2851#2855 and #2857#2859) are closed. #2856 remains independent.

quanru and others added 4 commits August 20, 2026 22:36
Co-authored-by: quanruzhuoxiu <robin.lifeos@gmail.com>
Co-authored-by: quanruzhuoxiu <robin.lifeos@gmail.com>
Co-authored-by: quanruzhuoxiu <robin.lifeos@gmail.com>
Co-authored-by: quanruzhuoxiu <robin.lifeos@gmail.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 24, 2026

Copy link
Copy Markdown

Deploying midscene with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8a10df8
Status: ✅  Deploy successful!
Preview URL: https://5d8780af.midscene.pages.dev
Branch Preview URL: https://feat-webp-format-aware-consu.midscene.pages.dev

View logs

Resolve report image-store changes against the latest main branch.

Keep WebP screenshot references valid in the generalized report schema.

Co-authored-by: quanruzhuoxiu <robin.lifeos@gmail.com>
quanru and others added 2 commits August 26, 2026 17:48
Validate encoded screenshot bytes at screenshot boundaries.

Avoid eager reads when a screenshot file is already persisted.

Co-authored-by: quanruzhuoxiu <robin.lifeos@gmail.com>
Merge the Rstest browser encoder test fix from the primitives layer.

Co-authored-by: quanruzhuoxiu <robin.lifeos@gmail.com>
@quanru
quanru marked this pull request as draft August 27, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant